import React, { Component } from 'react'

import RouterView from '../../router/router-view'

import {RouteItem} from '../../router/router-config'

import {NavLink} from 'react-router-dom'

import './index.scss'

interface Iprops{
    routes:RouteItem[]
}

export default class Main extends Component<Iprops> {
    render() {
        return (
            <div className="wrap">
                <div className="con">
                    <RouterView routes={this.props.routes}></RouterView>
                </div>
                <footer className="foot">
                    <NavLink to="/main/home">派送到家</NavLink>
                    <NavLink to="/main/classify">分类</NavLink>
                    <NavLink to="/main/vip">vip</NavLink>
                    <NavLink to="/main/car">car</NavLink>
                    <NavLink to="/main/my">my</NavLink>
                </footer>
            </div>
        )
    }
}
